import time
import requests
import json

url = "https://dsapi.xdf.cn/product/v2/class/search"

timer = int(time.time()*1000)
params = {
    "appId": 5053,
    "cityCode": 110100,
    "t": timer,
    "pageIndex": 2,
    "pageSize": 12,
    "keyword": "英语",
    "order": 0,
}

payload = {}
headers = {
    'accept': '*/*',
    'accept-language': 'zh-CN,zh;q=0.9',
    'content-type': 'application/json',
    'origin': 'https://souke.xdf.cn',
    'referer': 'https://souke.xdf.cn/search?cityCode=110100&kw=%E8%8B%B1%E8%AF%AD',
    'sec-ch-ua': '"Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123"',
    'sec-ch-ua-mobile': '?0',
    'sec-ch-ua-platform': '"Windows"',
    'sec-fetch-dest': 'empty',
    'sec-fetch-mode': 'cors',
    'sec-fetch-site': 'same-site',
    'sign': '40b7f1cb6409791d2be8a28b6d6f3d3f',
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36'
}

response = requests.request("GET", url, params=params, headers=headers, data=payload)

print(response.text)
